<div id = "body">

<h1>News</h1>

<a href = "<?php echo base_url(); ?>admin/news/add" class = "add"><img src = "<?php echo base_url(); ?>assets/modules/admin/image/icon-add.png">&nbsp;&nbsp;&nbsp;Add News</a>

<div class = "page">
<?
  //$count = $db->countOfAll('promotion');
  //$start = setpage($count);
?>
</div>

<div class = "clear"></div>

<table class ="list">
  <tr>
    <th scope="col">Title</th>
    <th scope="col" width = "120">Start</th>
    <th scope="col" width = "120">Finish</th>
    <th scope="col" width = "50">Edit</th>
    <th scope="col" width = "50">Delete</th>
  </tr>
<?
 foreach ($news_list as $v) {
?>
  <tr>
    <td><?php echo $v->n_title; ?></td>
    <td><?php echo date('d/m/Y',$v->n_start); ?></td>
    <td><?php echo date('d/m/Y',$v->n_finish); ?></td>
    <td><a href = "<?php echo base_url(); ?>admin/news/edit/<?php echo $v->n_id; ?>" class = "btn">edit</a></td>
    <td><a href = "<?php echo base_url(); ?>admin/news/del/<?php echo $v->n_id; ?>" class = "btn" onClick = "return confirmSubmit()">delete</a></td>
  </tr>
<?
  }
?>
</table>

</div>